interface TestInterface {
    name: string,
    age: number
}
// 我们还可以通过+/-指定添加还是删除
type OptionalTestInterface<T> = {
    [p in keyof T] +?:T[p]
}
type newTestInterface = OptionalTestInterface<TestInterface>
/* type newTestInterface = {
    name?: string | undefined;
    age?: number | undefined;
} */